package com.bd.scm.domain.dto.leave;

import com.alibaba.fastjson.annotation.JSONField;
import com.bd.scm.domain.dto.user.UserOfLeaveBatchDto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

/**
 * @author Mason
 * @version 1.0
 * @since 2019/12/13 9:22
 */
@Data
@ApiModel(value = "请假信息")
public class AddLeaveBatchDto {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty( value = "开始日期", notes = "开始日期", dataType = "Date", position = 1, required = true)
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date startDate;

    @ApiModelProperty( value = "结束日期", notes = "结束日期",dataType = "Date", position = 2, required = true)
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date endDate;

    @ApiModelProperty( value = "开始时间", notes = "开始时间",dataType = "Integer", position = 3, required = false)
    private Integer startTime;

    @ApiModelProperty( value = "结束时间", notes = "结束时间",dataType = "Integer", position = 4, required = false)
    private Integer endTime;

    /**
     * 假类ID
     */
    @ApiModelProperty( value = "假类ID", notes = "假类ID",dataType = "String", position = 5, required = true)
    private String leaveType;

    /**
     * 请假时长
     */
    @ApiModelProperty( value = "请假时长", notes = "请假时长",dataType = "Integer", position = 6, required = true)
    private Integer leaveDuration;

    /**
     * 一级审批人
     */
    @ApiModelProperty( value = "一级审批人", notes = "一级审批人",dataType = "Long", position = 7, required = false)
    private Long firstApprover;

    /**
     * 二级审批人
     */
    @ApiModelProperty( value = "二级审批人", notes = "二级审批人",dataType = "Long", position = 8, required = false)
    private Long secondApprover;

    @ApiModelProperty( value = "请假事由", dataType = "String", position = 9, required = true)
    private String remark;

    /**
     * 请假员工列表，逗号隔开
     */
    @ApiModelProperty( value = "员工ID集合", notes = "员工ID集合，用逗号隔开",dataType = "String", position = 10, required = true)
    private String userIds;

    @ApiModelProperty( value = "申请类型", notes = "申请类型, 1：个人，2：批量",dataType = "Integer", position = 11, required = true)
    private Integer applyType;

    @ApiModelProperty( value = "附件名称数组", notes = "附件名称列表，没有附件传空数组",dataType = "Array", position = 12, required = false)
    private List<String> uploadFileNames;

    /**
     * 单号
     */
    @ApiModelProperty(hidden = true)
    private String orderNo;

    @ApiModelProperty(hidden = true)
    private String leaveSelected;

    /**
     * 单据ID
     */
    @ApiModelProperty(hidden = true)
    private Integer orderId;

    /**
     * 假类是否为额度假
     */
    @ApiModelProperty(hidden = true)
    private Integer ishaveedu;

    /**
     * 操作IP
     */
    @ApiModelProperty(hidden = true)
    private String ip;

    /**
     * 操作人
     */
    @ApiModelProperty(hidden = true)
    private Long operateId;

    @ApiModelProperty( value = "请假总分钟", notes = "求请假单的最终总时长，需要乘以总人数",dataType = "Long", position = 1, required = false, hidden = true)
    private Long totalDuration;

    @ApiModelProperty( value = "每日请假详情", notes = "每日请假详情（日期，假类，时间）",dataType = "String", position = 1, required = false, hidden = true)
    private List<DayDetailedOfLeaveDto> leaveDateData;

    @ApiModelProperty( value = "选择的人员", notes = "请假人员表格  选择的人员",dataType = "String", position = 1, required = false, hidden = true)
    private List<UserOfLeaveBatchDto> peopleData;
}
